package cn.xiaopengstack.domain.trade.model.valobj;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.stream.Stream;

/**
 * @author jiangyangang
 */
@Getter
@AllArgsConstructor
public enum GroupBuyOrderListStatusEnum {
    INIT_LOCK(0, "初始锁定"),
    COMPLETE(1, "完成"),
    REFUND(2, "退单"),
    ;
    private final Integer status;
    private final String info;

    public static GroupBuyOrderListStatusEnum of(Integer status){
        return Stream.of(GroupBuyOrderListStatusEnum.values()).filter(e -> e.getStatus().equals(status)).findFirst().get();
    }
}
